package com.cz.nongyetongv5.bean;

import android.util.Log;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

//1：生产基地
//2：屠宰场
//3：收储运
//4：批发市场
//5：超市
//6：农贸市场
//7：其他
public class Huanjie implements Serializable {
	public static List<Huanjie> getLists()
	{
		return getLists("1,2,3,4,5,6,7,");

	}
	public static List<Huanjie> getLists(String allow)
	{
		allow=allow+",";
		Log.d("allowlist",allow);
		List<Huanjie> ds=new ArrayList<Huanjie>();
		if(allow.indexOf("1,")>=0)
			ds.add(new Huanjie(1,"生产基地"));
		if(allow.indexOf("2,")>=0)
			ds.add(new Huanjie(2,"屠宰场"));
		if(allow.indexOf("3,")>=0)
			ds.add(new Huanjie(3,"收储运"));
		if(allow.indexOf("4,")>=0)
			ds.add(new Huanjie(4,"批发市场"));
		if(allow.indexOf("5,")>=0)
			ds.add(new Huanjie(5,"超市"));
		if(allow.indexOf("6,")>=0)
			ds.add(new Huanjie(6,"农贸市场"));
		if(allow.indexOf("7,")>=0)
			ds.add(new Huanjie(7,"其他"));
		return ds;
	}
	public Huanjie(int _id,String _name){
		id=_id;
		name=_name;

	}
	private int id;
	private String name;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
}
